﻿package com.designoutput.elements
{
	import com.designoutput.enum.ElementType;
	import com.designoutput.utils.Unit;
	import com.designoutput.utils.UnitUtils;
	
	/**
	 * 
	 * <br>EllipseElement -> BaseRectElement -> BaseElement ->Base
	 */	
	public class EllipseElement extends BaseRectElement
	{
		public function EllipseElement()
		{
			super();
		}
		
		override public function getClassName():String{
			return ElementType.EllipseElement; 
		}

		override protected function updateElement():void
		{
			super.updateElement();
			
			this.graphics.clear();
			if (useLine){
				drawOvalRect(this, 0, 0, _width, _height, this.lineColor, this.lineAlpha, this.lineSize);
			}
			if (useFill){
				fillOvalRect(this, 0, 0, _width, _height, this.fillColor, this.fillAlpha, useLine ? this.lineColor : 0, this.lineAlpha, this.lineSize);
			}
		}
	}
}